begintownscript;

variables;

int i,b,c,d,j,k,r1,choice;

body;

// RENTAR - INHROS SPPECH. PAUSE ARE TOO LITTLE> SPEECH IS TOO QUICK. MUST CAHNGE FROM 10 to 20!

beginstate INIT_STATE;

enable_add_chars(1);

//Names must appear first.
	set_name(11,"Gomlaka");
	set_char_dialogue_pic(11,1946,0);
	
break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;

if (get_ran(1,0,100) < 7)
text_bubble_on_char(11,"Must get out.");
if (get_ran(1,0,100) < 7)
text_bubble_on_char(11,"Must Escape!");
if (get_ran(1,0,100) < 7)
text_bubble_on_char(11,"Must Warn!");
if (get_ran(1,0,100) < 7)
text_bubble_on_char(11,"Need to warn.");
if (get_ran(1,0,100) < 7)
text_bubble_on_char(11,"The Empire. Must Warn.");

break;

beginstate 26;
if (get_flag(5,7) < 1){  message_dialog("You walk inside the first of the two towers you were told about. It is huge, and you can hear the shuffling feet of numerous undead inside. One thing nags at you. Who made all of this?","");  set_flag(5,7,1);}
break;

beginstate 27;
if (get_flag(5,8) < 1){  message_dialog("You walk through the door, and stare at the creature inside the room. It stares back at you with large eyes, and then draws a jagged sword.","");  set_flag(5,8,1);}
break;

beginstate 28;
if (get_flag(5,9) < 1){  message_dialog("Unfortunately, you appear to have just burst in on a heavily armed group of Vahnatai Keepers, who really don't like you...","");  set_flag(5,9,1);}
break;

beginstate 29;
if (get_flag(5,10) < 1){  message_dialog("As you step on the Pentagram you feel it pulse with energy, trying to hold you in place. You break away easily, though worried.","");  set_flag(5,10,1);}
break;

beginstate 30;
if (get_flag(5,11) < 1){  message_dialog("Looking into this room, you can see that you are too late to help this prisoner. Their bones lie scattered on the floor.","");  set_flag(5,11,1);}
break;

beginstate 31;
if (get_flag(5,12) < 1){  message_dialog("While the ground floor is dominated by the sounds of shuffling undead feet, the second floor is paved with simple grass, and no undead appear to roam freely.","");  set_flag(5,12,1);}
break;

beginstate 32;
if (get_flag(5,13) < 1){  message_dialog("You've intruded on a group of Vahnatai Warriors, obviously bored with their vigil here. They joyously draw weapons and attack!","");  set_flag(5,13,1);}
break;

beginstate 33;
if (get_flag(5,14) < 1){  message_dialog("You step in the room, only to find that it is infested with undead. You look back at the warning sign on the obelisk and grimace. You should have paid more attention to it.","");  set_flag(5,14,1);}
break;

beginstate 34;
if (get_flag(5,15) < 1){  message_dialog("You enter the Ground floor barracks of the tower, only to find it empty. The Vahnatai however, have some security. Sitting in lava in the center is an Efreet - a Vahnatai creation!","");  set_flag(5,15,1);}
break;

beginstate 35;
if (get_flag(5,16) < 1){  message_dialog("Judging from the useless items in this room, and the pentagram on the floor, you believe this is where the Vahnatai used to make skeletons. Now, the room is covered in cobwebs.","When they created the Devas, it was probably rendered useless.");  set_flag(5,16,1);}
break;

beginstate 36;
if (get_flag(5,17) < 1){  message_dialog("The door ahead is covered with heavy runes of warding, and great power is being used to hold them there. You think that you could enter, but do you want to?","");  set_flag(5,17,1);}
break;

beginstate 37;
if (get_flag(5,18) < 1){  message_dialog("You walk down the first of two ramps, leading to a section of the tower which seems to hum softly.","");  set_flag(5,18,1);}
break;

beginstate 38;
if (get_flag(5,19) < 1){  message_dialog("You had heard tales of the Vahnatai's prowess at building machines. Now you can see them in action. Row upon row of laser bar your way. Something important must be at the other end.","");  set_flag(5,19,1);}
break;

beginstate 39;
if (get_flag(5,20) < 1){  message_dialog("The Vahnatai control room is guarded by all manner of summoned magical creatures, not to mention an Efreet, one of their own creations.","");  set_flag(5,20,1);}
break;

beginstate 40;
if (get_flag(5,21) < 1){  message_dialog("You attempt to use the control Panel in front of you. However, the Vahnatai's skill with machines is way beyond you. You haven't a clue of what to do. Any attempt to do something could well kill you. You prudently decide to leave it alone.","");  set_flag(5,21,1);}
//if (get_flag(5,21) < 1){  message_dialog("You sit down on the only seat in the room. The lights on the control panel are active, flashing. A beam of brilliant blue light washes over you, and the controls de-activate.","");  set_flag(5,21,1);}
//if (get_flag(5,22) = 1){  message_dialog("The lights on the Panel are on. You attempt to press the buttons, but magical sparks fly from the pedestal, and the machine shuts down.","");  set_flag(5,22,0);}
//if (get_flag(5,22) < 1){  message_dialog("The control panel's lights are dead. Luckily, your tool use is high enough, and you manage to turn it on. You try to move the controls, but they seem to be stuck.","");  set_flag(5,22,1);}
break;

beginstate 43;
if (get_flag(5,25) < 1){  message_dialog("Inside this chest are treasures beyond your wildest dreams...","");  set_flag(5,25,1);}
break;

beginstate 44;
if (get_flag(5,26) < 1){  message_dialog("This room must be where the Vahnatai throw the most important items they collect in. Now that's brilliant. Except that it's guarded by some undead who so do not want to give it to you.","");  set_flag(5,26,1);}
break;

beginstate 45;
if (get_flag(5,27) < 1){  message_dialog("As you walk down the corridor you see a being watching you. You look closely at it. Spindly legs, deadly looking weapon - it's a Vahnatai! It runs instantly, shouting the alarm.","");  set_flag(5,27,1);}
break;

beginstate 46;
if (get_flag(5,19) < 1){  message_dialog("As you walk down this corridor, you notice weird Star-Like symbols hovering in mid-air. They are similar to the Avernic ones. Looking further, you can see that row upon row of laser bars your way, again.","");  set_flag(5,19,1);}
break;

beginstate 47;
if (get_flag(5,29) < 1){  message_dialog("Lava bubbles upwards here, probably the thing that is powering the tower. Lots and lots of lava. While the Lava will probably crisp you to a cinder, there is a catwalk above it.","");  set_flag(5,29,1);}
//if (get_flag(5,29) = 1){  message_dialog("...There is a slim catwalk hugging close to the wall. Maybe it's the way to the next level.","");  set_flag(5,29,2);}
break;

beginstate 49;
if (get_flag(6,1) < 1){  message_dialog("Finally you reach the tip of the Tower. Staring ahead of you you can see a huge Dragon, ridden by a magical projection which frowns at you. Then it signals the remaining Vahnatai to attack!","");  set_flag(6,1,1);}
//if (get_flag(6,1) = 1){  message_dialog("_I am sorry, but I cannot allow you to escape alive._ While the projection cannot hurt you, her dragon can. It leaps forwards, with the few remainng Vahnatai close behind.","");  set_flag(6,1,2);}
break;

//beginstate 50;
//set_name (156, "Rentar Ihrno");
//set_level (156, 75);
//break;

beginstate 51;
block_entry(1);
break;

beginstate 52;
if (get_flag(25,0) < 1){  message_dialog("You pass the lasers, only to find a portcullis. It looks like you'd better search around for a Control Panel.","");  set_flag(25,0,1);}
break;

beginstate 53;
		// beginning cutscene
		reset_dialog();
		add_dialog_str(0,"As you enter the final level of the tower, you are amazed to find how cold it is. But the cold is the least of your concerns.",0);
		add_dialog_str(1,"Seated on a huge dragon is a Shade. It looks at you, and you feel it's malice and hatred.",0);
	    add_dialog_str(2,"It jumps down off the Dragon and walks towards you.",0);
			add_dialog_choice(0,"OK.");
		set_state_continue(54);
		break;
		
		beginstate 54;
	
		//if (get_flag(50,4) > 0)
			//end();		
		
		set_total_visibility(1);
		force_view_center(35,33);
		force_instant_terrain_redraw();
		pause(20);
		
		force_view_center(36,33);
		text_bubble_on_char(56,"Hmm");
		relocate_character(56,36,33);
                force_instant_terrain_redraw();
		pause(10);
		
		force_view_center(37,33);
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"Hmm");
		relocate_character(56,37,33);
force_instant_terrain_redraw();
		pause(10);
		
		force_view_center(38,33);
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"Hmm");	
		relocate_character(56,38,33);
force_instant_terrain_redraw();
		pause(10);
		

		force_view_center(39,33);
		text_bubble_on_char(53,"");
		text_bubble_on_char(56,"Hmm");
		relocate_character(56,39,33);
force_instant_terrain_redraw();
		pause(10);
		
		force_view_center(40,33);
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"Hmm");
		relocate_character(56,40,33);
force_instant_terrain_redraw();
		pause(10);
		
		force_view_center(41,33);
		text_bubble_on_char(52,"");
		text_bubble_on_char(56,"Hmm");
		relocate_character(56,41,33);
		set_character_facing(56,3);
force_instant_terrain_redraw();
		pause(10);
		
		force_view_center(41,34);
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"Hmm");
		relocate_character(56,41,34);
force_instant_terrain_redraw();
		pause(10);
		
		force_view_center(41,35);
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"Hmm");
		relocate_character(56,41,35);
force_instant_terrain_redraw();
		pause(10);
		
		force_view_center(41,36);
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"Hmm");
		relocate_character(56,41,36);
force_instant_terrain_redraw();
		pause(10);
		
		force_view_center(41,37);
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"Hmm");
		relocate_character(56,41,37);
force_instant_terrain_redraw();
		pause(10);
		
		force_view_center(41,38);
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"Hmm");
		relocate_character(56,41,38);
		set_character_facing(56,4);
force_instant_terrain_redraw();
		pause(10);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"A pitiful band of Adventurers! Ha!");
		force_instant_terrain_redraw();
force_instant_terrain_redraw();
		pause(20);
		
		force_view_center(41,38);
		text_bubble_on_char(56,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,35,33);
force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,36,33);
force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,37,33);
force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,38,33);
force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,39,33);
force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,40,33);
force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,41,33);
force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,42,33);
force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,42,34);
		set_character_facing(10,3);
force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,42,35);
force_instant_terrain_redraw();
		pause(1);
		
        i = random_party_member();
        b = random_party_member();
        text_bubble_on_char(10,"");
		text_bubble_on_char(56,"Hio! But you managed to get here. Tro!");		
		force_instant_terrain_redraw();
		pause(20);
		
		force_view_center(41,38);
		text_bubble_on_char(56,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,42,36);
force_instant_terrain_redraw();
		pause(1);
		
		text_bubble_on_char(56,"");
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,42,37);
force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,42,38);
force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,42,39);
        force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,41,39);
        force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,40,39);
        force_instant_terrain_redraw();
		pause(1);
		
		force_view_center(41,38);
		text_bubble_on_char(10,"");
		text_bubble_on_char(10,"Grrr");
		relocate_character(10,40,38);
        force_instant_terrain_redraw();
		pause(1);
		
		text_bubble_on_char(10,"");
		text_bubble_on_char(56,"I'm impressed.");		
		force_instant_terrain_redraw();
		pause(20);

        text_bubble_on_char(56,"");
		text_bubble_on_char(56,"Not everyone could get here.");		
		force_instant_terrain_redraw();
		pause(20);

		text_bubble_on_char(56,"");
		text_bubble_on_char(i,"Who are you?");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(56,"Rentar-Ihrno, of the Vahnatai.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(i,"Who?");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(1,"Rentar-Ihrno. I remember reading");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(1,"");
		text_bubble_on_char(1,"something about you.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(1,"");
		text_bubble_on_char(i,"Yeah, Rentar-Ihrno. That's who!");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(b,"A Vahnatai Archmage");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(1,"She was the one that killed Erika!");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(1,"");
		text_bubble_on_char(b,"An unfair fight.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(56,"Yes, I killed your stupid Mage.");		
		force_instant_terrain_redraw();
		pause(25);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(1,"Why?");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(1,"");
		text_bubble_on_char(56,"She got in my way.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(b,"That's just mean!");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(10,"Grrrrrrr");		
		force_instant_terrain_redraw();
		pause(10);
		
		text_bubble_on_char(10,"");
		text_bubble_on_char(1,"Oh Shut up! You useless dragon!");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(1,"");
		text_bubble_on_char(10,"Grrrrrrrrrrrrrrrr");		
		force_instant_terrain_redraw();
		pause(10);
		
		text_bubble_on_char(10,"");
		text_bubble_on_char(56,"Do not disturb my pet.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(b,"Pet?");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(1,"That thing?");		
		force_instant_terrain_redraw();
		pause(20);

		text_bubble_on_char(1,"");
		text_bubble_on_char(b,"Loopy!");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(56,"Yes, a pet. One who likes eating...");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"Say, people like you!");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(i,"Whoa!");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(1,"Why don't we just talk things over.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(1,"");
		text_bubble_on_char(56,"There is nothing to talk about.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(b,"Sure there is.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(i,"Lots!");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(56,"Such as?");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(1,"Your Maniacal Plan. For starters.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(1,"");
		text_bubble_on_char(56,"YOU, expect ME to tell you my plan?");		
		force_instant_terrain_redraw();
		pause(20);
				
		text_bubble_on_char(56,"");
		text_bubble_on_char(i,"Do we?");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(b,"Yes.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(56,"Why should I?");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(i,"Why shouldn't you?");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(10,"Grrrrrrrrrrrrrrrrrrrrrrrrrrrr");		
		force_instant_terrain_redraw();
		pause(10);
		
		text_bubble_on_char(10,"");
		text_bubble_on_char(56,"With that knowledge, you could...");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"Foil all of my plans!");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(i,"Not if we're dead.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(b,"Yeah, tell us, then kill us!");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(10,"Grrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr");		
		force_instant_terrain_redraw();
		pause(10);
		
		text_bubble_on_char(10,"");
		text_bubble_on_char(56,"Very well.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(i,"You're going to tell us?");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(b,"Wow!");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(56,"I am.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"Long ago, the Empire took");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"items from us.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(i,"The crystal souls.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(56,"Yes.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"For that, we destroyed their armies,");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"and ruined their lands.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"But adventurers, from Avernum,");
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"our allies, destroyed our hopes!");
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"They destroyed my Tower, in which");
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"all of our plagues were made.");
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"Now, centuries later, with only");
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"truly powerful mages having known us,");
		force_instant_terrain_redraw();
		pause(20);
				
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"We are reclaiming the surface,");
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"first by eradicating the Empire.");
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"And then their allies.");
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(i,"The Empire.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(b,"Avernum.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(56,"All will be destroyed.");
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(10,"Grrrrrrrrrrrrrrooooaaaaaaaaaaaarrrrr");		
		force_instant_terrain_redraw();
		pause(5);
		
		text_bubble_on_char(10,"");
		text_bubble_on_char(b,"This day just got worse,");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(i,"a lot worse.");		
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(56,"ATTACK!!!");
		force_instant_terrain_redraw();
		pause(20);
		
		text_bubble_on_char(56,"");	
		force_instant_terrain_redraw();
		set_flag(50,4,1);
set_total_visibility(0);
		
		end();
		
break;

beginstate 55;	

          if (get_flag(50,2) > 0)
			end();	

        force_view_center(8,8);
		i = random_party_member();
        b = random_party_member();
        c = random_party_member();
        d = random_party_member();
        set_total_visibility(1);
		text_bubble_on_char(11,"Rescuers?");
		relocate_character(11,8,8);
                force_instant_terrain_redraw();
		pause(15);
		
	    force_view_center(8,8);		
		text_bubble_on_char(11,"");
		text_bubble_on_char(b,"Yes, we're here to help.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(11,"Thank you. Thank you so much!");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(i,"What happened here?");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(11,"The Vahnatai happened.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(i,"What do you mean?");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(11,"Below here, far below, is Avernum.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(11,"This is MY, Gomlaka the Sorceror's");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(11," tower, but Rentar-Ihrno, a");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(11,"Vahnatai Archmage attacked");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(11," me, and took my Tower.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(c,"How?");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(c,"");
		text_bubble_on_char(11,"She came upon us with");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(11,"powerful magic, sweeping");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(11,"away our defences.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(11,"Then she bore us here,");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(11,"to the surface, into");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(11,"a sparsely populated valley.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(d,"Do you know her plan?");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(d,"");
		text_bubble_on_char(11,"Unfortunately, No.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(b,"Wait, this was YOUR tower?");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(11,"Yes");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(i,"Are you thinking what I'm thinking?");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(b,"Probably");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(b,"Gomlaka, you said that this");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(b,"was your Tower. Did you");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(b,"by any chance have a seeing");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(b,"pool? Or anything like one?");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(11,"I had a mobile-seeing furnace.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(c,"Mobile-seeing furnace. What's that?");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(c,"");
		text_bubble_on_char(11,"It is a seeing device which I can use");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(11,"to look anywhere within my tower from");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(11,"anywhere I please.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(i,"Can you do it from here?");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(i,"");
		text_bubble_on_char(11,"Yes. But it makes me even madder,");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(11,"seeing what they've done to my");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(11,"home.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(i,"Could you show us.");
		force_instant_terrain_redraw();
		pause(15);
	
		text_bubble_on_char(i,"");
		text_bubble_on_char(11,"Is it important?");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(b,"Yes.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(b,"");
		text_bubble_on_char(d,"Very.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(d,"");
		text_bubble_on_char(11,"Okay, close your eyes.");
		force_instant_terrain_redraw();
		pause(15);

		force_view_center(13,53);
		set_total_visibility(0);
		force_instant_terrain_redraw();
		pause(50);
		
		set_total_visibility(1);
		force_instant_terrain_redraw();
		pause(25);
		
		text_bubble_on_char(11,"");
		text_bubble_on_char(84,"What do you want to see?");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(84,"");
		text_bubble_on_char(76,"The leaders here.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(76,"");
		text_bubble_on_char(84,"Shifting");
		force_instant_terrain_redraw();
		pause(15);
		
		force_view_center(34,33);
		force_instant_terrain_redraw();
		pause(5);
		
		text_bubble_on_char(84,"");
		text_bubble_on_char(56,"There are intruders, you say.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(26,"Yes, Ihrno.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(26,"");
		text_bubble_on_char(56,"HOW did they penetrate");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"security?");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(26,"We do not know, Ihrno.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(26,"");
		text_bubble_on_char(56,"FIND them.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(26,"We will, Ihrno.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(26,"");
		text_bubble_on_char(56,"You had better,");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(56,"or you will die.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(26,"Yes Ihrno.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(26,"");
		text_bubble_on_char(56,"Begone from my sight!");
		force_instant_terrain_redraw();
		pause(15);
		
		force_view_center(13,53);
		force_instant_terrain_redraw();
		pause(5);
		
		text_bubble_on_char(56,"");
		text_bubble_on_char(76,"Follow Him!");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(76,"");
		text_bubble_on_char(84,"Shifting.");
		relocate_character(26,48,10);
		force_instant_terrain_redraw();
		pause(15);
		
		force_view_center(48,10);
		force_instant_terrain_redraw();
		pause(5);
		
		text_bubble_on_char(84,"");
		text_bubble_on_char(26,"There are Intruders in the");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(26,"");
		text_bubble_on_char(26,"Tower. Be mindful of them.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(26,"");
		text_bubble_on_char(78,"If they come in here, we will");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(78,"");
		text_bubble_on_char(78,"eliminate them.");
		force_instant_terrain_redraw();
		pause(15);
		
		force_view_center(13,53);
		force_instant_terrain_redraw();
		pause(5);
		
		text_bubble_on_char(78,"");
		text_bubble_on_char(84,"I feel weaker. We must stop.");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(84,"");
		text_bubble_on_char(76,"We've seen enough, take us back.");
		force_instant_terrain_redraw();
		pause(15);
		
		force_view_center(13,57);
		relocate_character(26,10,5);
		force_instant_terrain_redraw();
		pause(50);
		
		force_view_center(9,9);
		force_instant_terrain_redraw();
		pause(5);
		
		text_bubble_on_char(76,"");
		text_bubble_on_char(26,"I have you!");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(26,"");
		text_bubble_on_char(i,"Draw blades - FIGHT!");
		force_instant_terrain_redraw();
		pause(15);
		
		text_bubble_on_char(i,"");
		force_instant_terrain_redraw();
		pause(5);
		
		set_flag(50,2,1);
		toggle_quest(5,0);
set_total_visibility(0);
		end();
		
break;

beginstate 57;
if (get_flag(5,19) < 1){  message_dialog("You step out of the upper part of the Control Room. Lasers bar your way, and weird floating objects are visible behind them.","");  set_flag(5,19,1);}
break;

beginstate 58;
if (get_flag(5,19) < 1){  message_dialog("You step through the door, and are zapped by a laser.","More lasers bar your way, and round the corner to your left, you can just see some weird floating obect.");  set_flag(5,19,1);}
break;

beginstate 97;
if (get_flag(50,4) > 0)
			end();		
	reset_dialog();
	add_dialog_str(0,"You enter the room. LOTSA enemies are waiting for you. looks like you've got a fight on your hands!",0);
	add_dialog_choice(0,"View Cut-Scene");
	add_dialog_choice(1,"View Dialogue Boxes (instead of cut-scene)");
	choice = run_dialog(1);
	if (choice == 1)
		set_state_continue(53);
	if (choice == 2)
	set_state_continue(98);
break;

beginstate 98;
set_flag(50,4,1);
reset_dialog();
	add_dialog_str(0,"You step further into the room. As you do so, the creatures inside spot you.",0);
	add_dialog_str(1,"The leader looks at you, and smiles. _A band of Adventurers. How quaint_",0);
	add_dialog_str(2,"_Who are you?_ you demand. The Vahnatai just smiles. _I am Rentar-Ihrno of the Vahnatai._",0);
	add_dialog_str(3,"You just gape at her. Is this the Vahnatai who was responsible for the plagues upon Valorim centuries ago? If it is, you had better watch out.",0);
	add_dialog_str(4,"_I had hoped that you would be more interesting._ she tells you. _However, since you are not._ she snaps her fingers, and the enemies snap to attention!",0);
	add_dialog_choice(0,"Attack!");
	choice = run_dialog(1);
	if (choice == 1)
		end();
break;


break;